package us.nchu.tomtiger.rowMapper;

import org.springframework.jdbc.core.RowMapper;
import us.nchu.tomtiger.model.Admin;
import us.nchu.tomtiger.model.Collection;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by XiongXuan on 2018/1/8.
 */
public class AdminRowMapper implements RowMapper<Admin> {

    @Override
    public Admin mapRow(ResultSet resultSet, int i) throws SQLException {
        Admin admin = new Admin();

        admin.setId(resultSet.getString("id"));
        admin.setPassword(resultSet.getString("pass_word"));

        return admin;
    }
}
